Touch Sensor Compensation Circuit

ABSTRACT

An apparatus includes an integrator circuit, a compensation circuit, and a sense circuit. The compensation circuit applies a positive charge and a negative charge to the integrator circuit during a first time period and a second time period respectively. The integrator circuit integrates a signal and the positive charge to produce a first sense signal. The signal is based on a charge at an electrode of a touch sensor. The integrator circuit integrates the signal and the negative charge to produce a second sense signal. The sense circuit detects a touch based on the first sense signal and the second sense signal.

TECHNICAL FIELD

This disclosure generally relates to touch sensing technology.

BACKGROUND

According to an example scenario, a touch sensor detects the presenceand position of a an object (e.g., a user's finger or a stylus) within atouch-sensitive area of touch sensor array overlaid on a display screen,for example. In a touch-sensitive-display application, a touch sensorarray allows a user to interact directly with what is displayed on thescreen, rather than indirectly with a mouse or touch pad. A touch sensoris attached to or provided as part of a desktop computer, laptopcomputer, tablet computer, personal digital assistant (PDA), smartphone,satellite navigation device, portable media player, portable gameconsole, kiosk computer, point-of-sale device, or other device. Acontrol panel on a household or other appliance may include a touchsensor. There are a number of different types of touch sensors, such asfor example resistive touch sensors, surface acoustic wave touchsensors, and capacitive touch sensors.

In one example, when an object physically touches a touch screen withina touch sensitive area of a touch sensor of the touch screen (e.g., byphysically touching a cover layer overlaying a touch sensor array of thetouch sensor) or comes within a detection distance of the touch sensor(e.g., by hovering above the cover layer overlaying the touch sensorarray of the touch sensor), a change in capacitance occurs within thetouch screen at a position of the touch sensor of the touch screen thatcorresponds to the position of the object within the touch sensitivearea of the touch sensor. A touch sensor controller processes the changein capacitance to determine the position of the change of capacitancewithin the touch sensor (e.g., within a touch sensor array of the touchsensor).

BRIEF DESCRIPTION OF THE DRAWINGS

For a more complete understanding of the present disclosure and itsadvantages, reference is made to the following descriptions, taken inconjunction with the accompanying drawings, in which:

FIG. 1 illustrates an example system that includes a touch sensor,according to an embodiment of the present disclosure;

FIG. 2 illustrates an example device that houses the touch sensor,according to all embodiment of the present disclosure;

FIG. 3A illustrates an example touch sensor controller, according to anembodiment of the present disclosure;

FIG. 3B illustrates an example touch sensor controller, according to anembodiment of the present disclosure;

FIG. 4 illustrates an example compensation circuit, according to anembodiment of the present disclosure;

FIG. 5 illustrates an example signal diagram showing a first examplepre-charging of an integrator circuit using a compensation circuit,according to an embodiment of the present disclosure;

FIG. 6 illustrates an example signal diagram showing a second examplepre-charging of an integrator circuit using a compensation circuit,according to an embodiment of the present disclosure; and

FIG. 7 illustrates an example method for detecting a touch, according toan embodiment of the present disclosure.

DESCRIPTION OF EXAMPLE EMBODIMENTS

Touch sensors can detect touches and/or objects by monitoring electricsignals generated by an array of electrodes in the touch sensor. Eachelectrode is associated with a charge that produces an electric signalthrough the electrode. When a touch and/or an object is near theelectrode the charge associated with the electrode changes, and as aresult, the electric signal produced by that charge also changes. Thetouch sensor monitors the electric signal to determine when thatelectric signal changes. When the touch sensor detects that the electricsignal has changed, the touch sensor determines that a touch and/orobject is near the electrode.

One way to monitor the electric signal is to integrate the electricsignal over a monitoring cycle. During each cycle, the touch sensorintegrates the electric signal over that cycle and compares theintegrated signal against a baseline signal to determine whether achange has occurred. If a change has occurred, the touch sensor canconclude that a touch and/or an object is near the electrode.

One issue that degrades the performance of the touch sensor is theparasitic capacitances of components of the touch sensor. Theseparasitic capacitances introduce fixed and/or direct current (DC)components to the electric signals communicated by the electrodes. Whenthese DC components arc amplified and/or integrated, they degrade theaccuracy of the touch sensor by reducing the headroom available tomonitor the integrated signals of the touch sensor. As a result, thesignal to noise ratio of the touch sensor is decreased.

This disclosure contemplates a touch sensor that uses a compensationcircuit to remove the fixed and/or DC component introduced by theparasitic capacitances. The compensation circuit adds and/or removescharge from an input of an integrator circuit in order to cancel and/orreduce the DC component of the electric signal. As a result, the amountof headroom available in which to monitor the integrated signalincreases. Furthermore, the signal-to-noise ratio also increases. Thetouch sensor will be described generally, using FIGS. 1 and 2. The touchsensor will be described in more detail using FIGS. 3 through 7.

FIG. 1 illustrates an example system 100 that includes a touch sensor102, according to an embodiment of the present disclosure. Touch sensor102 includes touch sensor array 106 and touch sensor controller 108.Touch sensor array 106 and touch sensor controller 108 detect thepresence and position of a touch or the proximity of an object within atouch-sensitive area of touch sensor array 106.

Touch sensor array 106 includes one or more touch-sensitive areas. Inone embodiment, touch sensor army 106 includes an array of electrodesdisposed on one or more substrates, which arc made of a dielectricmaterial. Reference to a touch sensor array can encompass both theelectrodes of touch sensor array 106 and the substrate(s) on which theyare disposed. Alternatively, reference to a touch sensor array mayencompass the electrodes of touch sensor array 106, but not thesubstrate(s) on which they are disposed.

In one embodiment, an electrode is an area of conductive materialforming a shape, such as for example a disc, square, rectangle, thinline, other shape, or a combination of these shapes. One or more cuts inone or more layers of conductive material (at least in part) create theshape of an electrode, and the area of the shape are (at least in part)hounded by those cuts. In one embodiment, the conductive material of anelectrode occupies approximately 100% of the area of its shape. Forexample, an electrode is made of indium tin oxide (ITO) and the ITO ofthe electrode occupies approximately 100% of the area of its shape(sometimes referred to as 100% fill). In one embodiment, the conductivematerial of an electrode occupies less than 100% of the area of itsshape. For example, an electrode may be made of line lines of metal orother conductive material (FLM), such as for example copper, silver, ora copper- or silver-based material, and the fine lines of conductivematerial may occupy approximately 5% of the area of its shape in ahatched, mesh, or other pattern. Reference to FLM encompasses suchmaterial. Although this disclosure describes or illustrates particularelectrodes made of particular conductive material Forming particularshapes with particular fill percentages having particular patterns, thisdisclosure contemplates, in any combination, electrodes made of otherconductive materials forming other shapes with other fill percentageshaving other patterns.

The shapes of the electrodes (or other elements) of a touch sensor array106 constitute, in whole or in part, one or more macro-features of touchsensor array 106 array 10. One or more characteristics of theimplementation of those shapes (such as, lift example, the conductivematerials, fills, or patterns within the shapes) constitute in whole orin part one or more micro-features of touch sensor array 106. One ormore macro-features of a touch sensor array 106 may determine one ormore characteristics of its functionality, and one or moremicro-features of touch sensor array 106 may determine one or moreoptical features of touch sensor array 106, such as transmittance,refraction, or reflection.

Although this disclosure describes a number of example electrodes, thepresent disclosure is not limited to these example electrodes and otherelectrodes may be implemented. Additionally, although this disclosuredescribes a number of example embodiments that include particularconfigurations of particular electrodes forming particular nodes, thepresent disclosure is not limited to these example embodiments and otherconfigurations may be implemented. In one embodiment, a number ofelectrodes are disposed on the same or different surfaces of the samesubstrate. Additionally or alternatively, different electrodes may hedisposed on different substrates. Although this disclosure describes anumber of example embodiments that include particular electrodesarranged in specific, example patterns, the present disclosure is notlimited to these example patterns and other electrode patients may beimplemented.

A mechanical stack contains the substrate (or multiple substrates) andthe conductive material forming the electrodes of touch sensor array106. For example, the mechanical stack may include a first layer ofoptically clear adhesive (OCA) beneath a cover panel. The cover panelmay be clear and made of a resilient material for repeated touching,such as for example glass, polycarbonate, or poly(methyl methacrylate)(PMMA). This disclosure contemplates cover panel being made of anymaterial. The first layer of OCA may be disposed between the cover paneland the substrate with the conductive material forming the electrodes.The mechanical stack may also include a second layer of OCA and adielectric layer (which may be made of PET or another material, similarto the substrate with the conductive material (brining the electrodes).As an alternative, a thin coating of a dielectric material may beapplied instead of the second layer of OCA and the dielectric layer. Thesecond layer of OCA may be disposed between the substrate with theconductive material making up the electrodes and the dielectric layer,and the dielectric layer may be disposed between the second layer of OCAand an air gap to a display of a device including touch sensor array 106and touch sensor controller 108. For example, the cover panel may have athickness of approximately 1 millimeter (mm); the first layer of OCA mayhave a thickness of approximately 0.05 mm; the substrate with theconductive material forming the electrodes may have a thickness ofapproximately 0.05 mm; the second layer of OCA may have a thickness ofapproximately 0.05 mm; and the dielectric layer may have a thickness ofapproximately 0.05 mm.

Although this disclosure describes a particular mechanical stack with aparticular number of particular layers made of particular materials andhaving particular thicknesses, this disclosure contemplates othermechanical stacks with any number of layers made of any materials andhaving any thicknesses. For example, in one embodiment, a layer ofadhesive or dielectric may replace the dielectric layer, second layer ofOCA, and air gap described above, with there being no air gap in thedisplay.

One or more portions of the substrate of touch sensor array 106 may hemade of polyethylene terephthalate (PET) or another material. Thisdisclosure contemplates any substrate with portions made of anymaterial(s). In one embodiment, one or more electrodes in touch sensorarmy 106 are made of ITO in whole or in part. Additionally oralternatively, one or more electrodes in touch sensor army 106 are madeof fine lines of metal or other conductive material. For example, one ormore portions of the conductive material may he copper or copper-basedand have a thickness of approximately 5 microns (μm) or less and a widthof approximately 10 μm or less. As another example, one or more portionsof the conductive material may be silver or silver-based and similarlyhave a thickness of approximately 5 μm or less and a width orapproximately 10 μm or less. This disclosure contemplates any electrodesmade of any materials.

In one embodiment, touch sensor array 106 implements a capacitive formof touch sensing. In a mutual-capacitance implementation, touch sensorarray 106 may include an array of drive and sense electrodes forming anarray of capacitive nodes. A drive electrode and a sense electrode mayform a capacitive node. The drive and sense electrodes forming thecapacitive node are positioned near each other but do not makeelectrical contact with each other. Instead, in response to a signalbeing applied to the drive electrodes for example, the drive and senseelectrodes capacitively couple to each other across a space betweenthem. A pulsed or alternating voltage applied to the drive electrode (bytouch sensor controller 108) induces a charge on the sense electrode,and the amount of charge induced is susceptible to external influence(such as a touch or the proximity of an object). When an object touchesor comes within proximity of the capacitive node, a change incapacitance may occur at the capacitive node and touch sensor controller108 measures the change in capacitance. By measuring changes incapacitance throughout the army, touch sensor controller 108 determinesthe position of the touch or proximity within touch-sensitive areas oftouch sensor array 106.

In a self-capacitance implementation, touch sensor array 106 may includean array of electrodes of a single type that may each limn a capacitivenode. When an object touches or comes within proximity of the capacitivenode, a change in self-capacitance may occur at the capacitive node andtouch sensor controller 108 measures the change in capacitance, forexample, as a change in the amount of charge implemented to raise thevoltage at the capacitive node by a predetermined amount. As with amutual-capacitance implementation, by measuring changes in capacitancethroughout the array, touch sensor controller 108 determines theposition of the touch or proximity within touch-sensitive areas of touchsensor array 106. This disclosure contemplates any form of capacitivetouch sensing.

In one embodiment, one or more drive electrodes together form a driveline running horizontally or vertically or in other orientations.Similarly, in one embodiment, one or more sense electrodes together forma sense line running horizontally or vertically or in otherorientations. As one particular example, drive lines run substantiallyperpendicular to the sense lines. Reference to a drive line mayencompass one or more drive electrodes making up the drive line, andvice versa. Reference to a sense line may encompass one or more senseelectrodes making up the sense line, and vice versa.

In one embodiment, touch sensor array 106 includes drive and senseelectrodes disposed in a pattern on one side of a single substrate. Insuch a configuration, a pair of drive and sense electrodes capacitivelycoupled to each other across a space between them form a capacitivenode. As an example self-capacitance implementation, electrodes of asingle type are disposed in a pattern on a single substrate. In additionor as an alternative to having drive and sense electrodes disposed in apattern on one side of a single substrate, touch sensor array 106 mayhave drive electrodes disposed in a pattern on one side of a substrateand sense electrodes disposed in a pattern on another side of thesubstrate. Moreover, touch sensor array 106 may have drive electrodesdisposed in a pattern on one side of one substrate and sense electrodesdisposed in a pattern on one side of another substrate. In suchconfigurations, an intersection of a drive electrode and a senseelectrode forms a capacitive node. Such an intersection may be aposition where the drive electrode and the sense electrode “cross” orcome nearest each other in their respective planes. The drive and senseelectrodes do not make electrical contact with each other instead theyare capacitively coupled to each other across a dielectric at theintersection. Although this disclosure describes particularconfigurations of particular electrodes forming particular nodes, thisdisclosure contemplates other configurations of electrodes formingnodes. Moreover, this disclosure contemplates other electrodes disposedon any number of substrates in any patterns.

As described above, a change in capacitance at a capacitive node oftouch sensor array 106 may indicate a touch or proximity input at theposition of the capacitive node. Touch sensor controller 108 detects andprocesses the change in capacitance to determine the presence andposition of the touch or proximity input. In one embodiment, touchsensor controller 108 then communicates information about the touch orproximity input to one or more other components (such as one or morecentral processing units (CPUs)) of a device that includes touch sensorarray 106 and touch sensor controller 108, which may respond to thetouch or proximity input by initiating a function of the device (or anapplication running on the device). Although this disclosure describes aparticular touch sensor controller 108 having particular functionalitywith respect to a particular device and a particular touch sensor 102,this disclosure contemplates other touch sensor controllers having anyfunctionality with respect to any device and any touch sensor.

In one embodiment, touch sensor controller 108 is implemented as one ormore integrated circuits (ICs), such as for example general-purposemicroprocessors, microcontrollers, programmable logic devices or arrays,application-specific ICs (ASICs). Touch sensor controller 108 comprisesany combination of analog circuitry, digital logic, and digitalnon-volatile memory. In one embodiment, touch sensor controller 108 isdisposed on a flexible printed circuit (FPC) bonded to the substrate oftouch sensor array 106, as described below. The FPC may he active orpassive. In one embodiment, multiple touch sensor controllers 108 aredisposed on the FPC.

In an example implementation, touch sensor controller 108 includes aprocessor unit, a drive unit, a sense unit, and a storage unit. In suchan implementation, the drive unit supplies drive signals to the driveelectrodes of touch sensor array 106, and the sense unit senses chargeat the capacitive nodes of touch sensor array 106 and providesmeasurement signals to the processor unit representing capacitances atthe capacitive nodes. The processor unit controls the supply of drivesignals to the drive electrodes by the drive unit and processesmeasurement signals from the sense unit to detect and process thepresence and position of a touch or proximity input withintouch-sensitive areas of touch sensor array 106. The processor unit mayalso track changes in the position of a touch or proximity input withintouch-sensitive areas of touch sensor array 106. The storage unit storesprogramming for execution by the processor unit, including programmingfor controlling the drive unit to supply drive signals to the driveelectrodes, programming for processing measurement signals from thesense unit, and other programming. Although this disclosure describes aparticular touch sensor controller 108 having a particularimplementation with particular components, this disclosure contemplatestouch sensor controller having other implementations with othercomponents.

Tracks 110 of conductive material disposed on the substrate of touchsensor array 106 couple the drive or sense electrodes of touch sensorarray 106 to connection pads 112, also disposed on the substrate oftouch sensor array 106. As described below, connection pads 112facilitate coupling of tracks 110 to touch sensor controller 108. Tracks110 may extend into or around (e.g., at the edges of) touch-sensitiveareas of touch sensor array 106. In one embodiment, particular tracks110 provide drive connections for coupling touch sensor controller 108to drive electrodes of touch sensor array 106, through which the driveunit of touch sensor controller 108 supplies drive signals to the driveelectrodes, and other tracks 110 provide sense connections for couplingtouch sensor controller 108 to sense electrodes of touch sensor array106, through which the sense unit of touch sensor controller 108 sensescharge at the capacitive nodes of touch sensor array 106.

Tracks 110 arc made of fine lines of metal or other conductive material.For example, the conductive material of tracks 110 may be copper orcopper-based and have a width of approximately 100 μm or less. Asanother example, the conductive material of trucks 110 may be silver orsilver-based and have a width of approximately 100 μm or less. In oneembodiment, tracks 110 are made of ITO in whole or in part in additionor as an alternative to the line lines of metal or other conductivematerial. Although this disclosure describes particular tracks made ofparticular materials with particular widths, this disclosurecontemplates tracks made of other materials and/or other widths. Inaddition to tracks 110. touch sensor array 106 may include one or moreground lines terminating at a ground connector (which may be aconnection pad 112) at an edge of the substrate of touch sensor array106 (similar to tracks 110).

Connection pads 112 may be located along one or more edges of thesubstrate, outside a touch-sensitive area of touch sensor array 106. Asdescribed above, touch sensor controller 108 may be on an FPC.Connection pads 112 may be made or the same material as tracks 110 andmay he bonded to the FPC using an anisotropic conductive film (ACF). Inone embodiment, connection 114 includes conductive lines on the FPCcoupling touch sensor controller 108 to connection pads 112, in turncoupling touch sensor controller 108 to tracks 110 and to the drive orsense electrodes of touch sensor array 106. In another embodiment,connection pads 112 are connected to an electro-mechanical connector(such as, for example, a zero insertion force wire-to-board connector).Connection 114 may or may not include an FPC. This disclosurecontemplates any connection 114 between touch sensor controller 108 andtouch sensor array 106.

FIG. 2 illustrates an example device 200 that houses touch sensor 102,according to an embodiment of the present disclosure. Device 200 is anypersonal digital assistant, cellular telephone, smartphone, tabletcomputer, and the like. In one embodiment, device 200 includes othertypes of devices, such as automatic teller machines (ATMs), homeappliances, personal computers, and any other such device having a touchscreen. In the illustrated example, components of system 100 areinternal to device 200. Although this disclosure describes a particulardevice 200 having a particular implementation with particularcomponents, this disclosure contemplates any device 200 having anyimplementation with ally components.

A particular example of device 200 is a smartphone that includes ahousing 201 and a touch screen display 202 occupying a portion of asurface 204 or housing 201 of device 200. In an embodiment, housing 201is an enclosure of device 200, which may contain internal components(e.g., internal electrical components) of device 200. Touch sensor 102may he coupled, directly or indirectly, to housing 201 of device 200.Touch screen display 202 may occupy a significant portion or all of asurface 204 (e.g., one of the largest surfaces 204) of housing 201 ofdevice 200. Reference to a touch screen display 202 includes coverlayers that overlay the actual display and touch sensor elements ordevice 200, including a top cover layer (e.g., a glass cover layer). Inthe illustrated example, surface 204 is a surface of the top cover layerof touch screen display 202. In an embodiment, the top cover layer(e.g., a glass cover layer) of touch screen display 200 is consideredpart of housing 201 of device 200.

In one embodiment, the large size of touch screen display 202 allows thetouch screen display 202 to present a wide variety or data, including akeyboard, a numeric keypad, program or application icons, and variousother interfaces. In one embodiment, a user interacts with device 200 bytouching touch screen display 202 with a stylus, a finger, or any otherobject in order to interact with device 200 (e.g., select a program forexecution or to type a letter on a keyboard displayed on the touchscreen display 202). In one embodiment, a user interacts with device 200using multiple touches to perform various operations, such as to zoom inor zoom out when viewing a document or image. In some embodiments, suchas home appliances, touch screen display 202 does not change or changesonly slightly during device operation, and recognizes only singletouches.

Users may interact with device 200 by physically impacting surface 204(or another surface) of housing 201 of device 200, shown as impact 206,using an object 208, such as, for example, one or more fingers, one ormore styluses, or other objects. In one embodiment, surface 204 is acover layer that overlies touch sensor array 106 and a display of device200. As described above, users may perform a series of physical impacts(e.g., a double-tap, a triple-tap, or another implemented series ofimpacts) to initiate a transition of touch sensor 102 (e.g., touchsensor controller 108) from a first power mode (e.g., a low power mode)to a second power mode (e.g., to wake up touch sensor 102 (e.g., touchsensor controller 108) of device 200). Impact sensor 104 detects impacts206 and communicates an output signal indicative of the detected impacts206. Touch sensor controller 108 (e.g., a monitoring component of touchsensor controller 108) receives the output signal from impact sensor 104and initiates, based on the output signal corresponding to a predefinedimpact pattern (e.g., a double-tap occurring within a predeterminedperiod of time), the transition of touch sensor 102 (e.g., touch sensorcontroller 108) from the first power mode to the second power mode.

Device 200 includes buttons 210, which may perform any purpose inrelation to the operation of device 200. One or more of buttons 210(e.g., button 210 b) may operate as a so-called “home button” that, atleast in part, indicates to device 200 that a user is preparing toprovide input to touch sensor 102 of device 200. As described in greaterdetail below, an embodiment of the present disclosure may reduce oreliminate various reasons for including a “home button.”

FIG. 3A illustrates an example touch sensor controller 108 according toan embodiment of the present disclosure. As illustrated in FIG. 3A,touch sensor controller 108 includes an integrator circuit 305, a sensecircuit 310, and a compensation circuit 315. In one embodiment,compensation circuit 315 increases the headroom available in which sensecircuit 310 monitors electric signals from integrator circuit 305 byadding and/or removing charge to an input of integrator circuit 305. Asa result, the electric signals from integrator circuit 305 canexperience a greater change in voltage before hitting a rail (eitherground or supply voltage). Therefore, the ability of touch sensor 102 todetect a touch improves.

Integrator circuit 305 is coupled to touch sensor array 106. Integratorcircuit 305 receives an electric signal from an electrode of touchsensor array 106. The electric signal is based on a charge at theelectrode. Integrator circuit 305 integrates the electric signal toproduce two sense signals (e.g., a positive sense signal and a negativesense signal). These two sense signals are then monitored by sensecircuit 310 to determine whether a touch occurred. For example, if oneor more of the two sense signals deviates from a known or preselectedbaseline signal, it can he determined that a touch occurred near theelectrode. As another example, if a difference between the two sensesignals deviates from a known or preselected difference, it can bedetermined that a touch occurred near the electrode.

Sense circuit 310 receives the two sense signals produced by integratorcircuit 305. Sense circuit 310 monitors the two sense signals fromintegrator circuit 305 to determine whether a touch occurred near theelectrode of touch sensor array 106. For example, sense circuit 310 canfirst establish a baseline for each of the two sense signals. Then,sense circuit 310 monitors the two sense signals to see if they deviatefrom the baselines by a selected threshold. If one or more of the twosense signals deviate from the baseline by more than the threshold, thensense circuit 310 determines that a touch occurred near the electrode.As another example, sense circuit 310 can establish a baselinedifferential and/or difference between the two sense signals. Sensecircuit 310 then monitors the difference between the two sent signals;if that difference deviates from the baseline difference by more than aselected threshold, then sense circuit 310 determines that a touchoccurred near the electrode.

Pursuant to one example scenario, the performance and/or accuracy ofsense circuit 310 may be degraded by the parasitic capacitances ofcomponents of touch sensor 102. These parasitic capacitances introduceDC components into the electric signal communicated by the electrodes oftouch sensor array 106. When these DC components arc integrated, itreduces the amount of headroom in which sense circuit 310 can monitorthe two sense signals produced by integrator circuit 305. In otherwords, the DC components cause the two sense signals to be closer to thevoltage rails (e.g., around or the supply voltage rail). Therefore, theamount of voltage change that the sense signal can experience beforehitting a voltage rail is decreased (less headroom), which allows forthe gain of integrator circuit 305 to he increased thereby increasingthe size of the touch signal. Because the reduced voltage change may bemore difficult to detect, sense circuit 310 may not detect a touch inthese circumstances. By removing the DC components, the sense signal canexperience more voltage change before hitting a voltage rail (moreheadroom), which allows for the twin of integrator circuit 305 to heincreased thereby increasing the size of the touch signal. As a result,the signal-to-noise ratio of the two sense signals is increased, therebyimproving the touch detection capabilities of touch sensor 102.

Touch sensor controller 108 includes compensation circuit 315 that addsand/or removes charge to compensate and/or reduce the effect of the DCcomponent caused by the parasitic capacitances of touch sensor 102. Asillustrated in FIG. 3A, compensation circuit 315 is coupled to an inputof integrator circuit 305. Compensation circuit 315 adds and/or removescharge from the signal produced by touch sensor array 106 before thatsignal is integrated by integrator circuit 305 (and/or during theintegration phase(s)). As a result, the charge that compensation circuit315 adds and/or removes compensates and/or reduces the DC component ofthe amplified signal. By reducing and/or removing the DC component, thetwo sense signals produced by integrator circuit 305 provide additionalheadroom in which sense circuit 310 can monitor the two sent signalsthereby allowing system gain to be increased (e.g., there is additionalheadroom in which sense circuit 310 can monitor the actual touch signal,thereby allowing system gain to he increased). The operation ofcompensation circuit 315 will be discussed in more detail using FIGS. 4through 7. This disclosure contemplates adding and removing charge to heequivalent to applying a positive and negative charge. For example,charge can be added by applying a positive charge and charge can heremoved by applying a negative charge, or vice versa.

Compensation circuit 315 receives input through power line 325 andcontrol lines 330. Power line 325 supplies charge to compensationcircuit 315. In some embodiments, that charge is added to and/or removedfrom integrator circuit 305. A signal from control 330 controls whethercompensation circuit 315 adds or removes charge.

In one embodiment, compensation circuit 315 is powered by a ground-basedreference voltage that is substantially constant over an operatingtemperature range (e.g., a five degree Celsius range) of an operatingtemperature of touch sensor 102. Furthermore, the ground-basedreferenced voltage is substantially independent of a supply voltage usedto power integrator circuit 305. For example, the ground-based referencevoltage deviates by less than 1% over a one hundred and forty-fivedegree Celsius range (e.g., from −40 to 105 degrees Celcius) ofoperating temperature of touch sensor 102. As another example, theground based reference voltage deviates by less than 1% of a change tothe supply voltage that powers integrator circuit 305.

FIG. 3B illustrates an example touch sensor controller 108 according toan embodiment of the present disclosure. Touch sensor controller 108includes a current amplifier circuit 300, an integrator circuit 305, asense circuit 310, a compensation circuit 315, and a built-in self-testcircuit 320. The addition of current amplification circuit 300 improvesthe operation of touch sensor 102 by allowing scaling of the inputsignal. The built-in self-test circuit 320 reduces the test time andproduction cost of touch controller 108 by allowing less interactionwith external test equipment. Furthermore, the operation of touch sensor102 is improved because built-in-self-test circuit 320 allows forrun-time calibration or diagnostic tests. The operation of the exampletouch sensor controller 108 of FIG. 3B is substantially similar to theoperation of the example touch sensor Controller 108 of FIG. 3A with afew noted differences.

As illustrated in FIG. 3B, current amplifier circuit 300 is coupled totouch sensor array 106 and integrator circuit 305. Current amplifiercircuit 300 receives an electric signal front an electrode of touchsensor array 106. The signal is based on a charge at the electrode.Current amplifier circuit 300 amplifies the electric signal. Thisdisclosure contemplates current amplifier circuit 300, including anynumber of components such as, for example, one or more currentamplifiers and/or one or more differential amplifiers configured toamplify the electric signal front touch sensor array 106. Furthermore,it is contemplated that each electrode of touch sensor array 106communicates an electric signal that is amplified by current amplifiercircuit 300. In one embodiment, by amplifying the electric signal fromthe electrode, small changes and variations in the electric signalcaused by a touch and/or object near the electrode become easier todetect. The current amplifier circuit 300 can be tuned and/or adjustedsuch that current amplifier circuit 300 provides a particular amount ofgain to an electric signal at a first point in time and, based on thetuning and/or adjusting, a different amount of gain at a second point intime. Integrator circuit 305 receives the amplified electric signal fromcurrent amplifier circuit 300 and integrates the amplified electricsignal to produce the two sense signals. It is further contemplated thatamplifier circuit 300 has a gain less than one such that amplifiercircuit 300 operates as an attenuator.

Additionally, compensation circuit 315 is also coupled to an input ofcurrent amplifier circuit 300. In this manner, compensation circuit 315adds and/or removes charge from the electric signal received by currentamplifier circuit 300. As a result, any DC component in the electricsignal communicated by an electrode of touch sensor array 106 can bereduced and/or removed before being amplified by current amplifiercircuit 300.

Furthermore, compensation circuit 315 is also coupled to an input of abuilt-in self-test circuit 320 in one embodiment. Compensation circuit315 acids and/or removes charge to an input of built-in self-testcircuit 320. The line over which compensation circuit 315 adds and/orremoves charge from built-in self-test circuit 320 is referred to as abuilt-in self-test bus. In this manner, the charge that compensationcircuit 315 adds and/or removes can be tested using built-in self-testcircuit 320. As a result, self-testing of compensation circuit 315 canbe performed by built-in self-test circuit 320, which simplifiesproduction testing of touch sensor 102. Furthermore, built-in self-testcircuit 320 can be used to perform diagnostic checks or touch sensor 102during an operation of touch sensor 102. In one embodiment, compensationcircuit 315 can be used to test other circuit blocks by applying acharge signal to the other blocks. Built-in-self-test circuit 320provides a bus that connects compensation circuit 315 to the otherblocks. For example, an input of another integrator circuit (if thereare multiple integrators in the touch controller 108) can be connectedto compensation circuit 315 through built-in self-test circuit.

Moreover, compensation circuit 315 receives additional input throughcontrol line 335. A signal from control line 335 controls to from wherecompensation circuit 315 adds/removes charge (e.g., current amplifiercircuit 300, integrator circuit 305, and/or built-in self-test circuit320).

Additionally, current amplifier circuit 300 includes an input for apositive reference voltage and a negative reference voltage in oneembodiment. The magnitude of the positive reference voltage and themagnitude of the negative reference voltage are substantially equal tothe magnitude of the ground-based reference voltage used to powercompensation circuit 315. For example, the magnitude of the positivereference voltage and the magnitude of the negative reference voltagedeviate less than 1% from the magnitude of the ground-based referencevoltage. As a result, the ground-based reference voltage, the positivereference voltage, and the negative reference voltage arc keptindependent of the supply voltage powering integrator circuit 305, whichreduces the effect of supply voltage variation (e.g., across temperatureranges, battery lifetime, etc.) and supply voltage noise on theground-based reference voltage, the positive reference voltage, and thenegative reference voltage.

FIG. 4 illustrates an example compensation circuit 315 according to anembodiment of the present disclosure. As illustrated in FIG. 4,compensation circuit 315 includes a driver 400, a resistor 405, acapacitor 410, and a demultiplexer 415. In one embodiment, compensationcircuit 315 adds and/or removes charge from various components of touchsensor controller 108 to increase the available headroom in which sensecircuit 310 can monitor a first sense signal and a second sense signalproduced by integrator circuit 305.

Driver 400 drives a positive charge or a negative charge throughcompensation circuit 315. Driver 400 receives a charge over power line325 and a control signal over control line 330. Based on that controlsignal, driver 400 determines whether driver 400 drives a positivecharge or a negative charge. For example, if the control signalindicates that driver 400 should be adding charge, then driver 400 willdrive the charge received over power line 325. If the control signalindicates that driver 400 should he removing charge, driver 400 willinstead draw charge to ground. In an embodiment, power line 325 carriesa reference voltage set by a ground based reference system. The outputor driver 400 is toggled between power line 325 and ground to providethe positive and negative charges (e.g., from ground to power line 325to provide a positive charge and from power line 325 to ground toprovide a negative charge). In one embodiment, the control signal isprovided by touch sensor controller 108 rather than a component externalto controller 108. The control signal is based on a phase of integratorcircuit 305 in one embodiment. For example, during a negativeintegration phase of integrator circuit 305, the control signal causesdriver 400 to drive a positive charge through compensation circuit 315.As another example, during a positive integration phase of integratorcircuit 305, the control signal causes driver 400 to drive a negativecharge through or remove charge from compensation circuit 315. In oneembodiment, driver 400 uses a ground based reference voltage as supplyin order to remove an effect of drift in a main supply voltage of thedevice.

Resistor 405 and capacitor 410 are coupled in series to driver 400. Aninput of resistor 405 is coupled to an output of driver 400 and an inputof capacitor 410 is coupled to an output of resistor 405. Resistor 405and capacitor 410 affect how quickly charge is added and/or removedthrough compensation circuit 315. For example, an impedance/resistanceof resistor 405 affects bow quickly electric energy is transferred to orfrom capacitor 410 and a capacitance of capacitor 410 affects how muchenergy is stored by capacitor 410. In one embodiment, resistor 405 is avariable resistor whose impedance/resistance can he adjusted.Furthermore, in one embodiment, capacitor 410 is a variable capacitorwhose capacitance can be adjusted. By allowing resistor 405 and/orcapacitor 410 to he variable, compensation circuit 315 can he configuredto add and/or remove different amounts of charge at different ratesdepending on the state of touch sensor 102. For example, compensationcircuit 315 can he configured to add a certain amount of charge during anegative integration phase of integrator circuit 305 and to remove adifferent amount of charge during a positive integration phase ofintegrator circuit 305. As another example, compensation circuit 315 canbe configured to add a certain amount of charge when compensationcircuit 315 is adding charge to an input of current amplifier circuit300 and to remove a different amount of charge when compensation circuit315 is removing charge from an input of integrator circuit 305.

Demultiplexer 415 switches the output of compensation circuit 315. Aninput of demultiplexer 415 is coupled to an output of capacitor 410.Furthermore, demultiplexer 415 receives a control signal over controlline 335. In one embodiment, the control signal is provided by touchsensor controller 108 instead of a component external to controller 108.Demultiplexer 315 includes multiple outputs: an output to currentamplifier circuit 300, an output to integrator circuit 305, and anoutput to built-in self-test circuit 320. Depending on the controlsignal received over control line 335, demultiplexer 315 will send theoutput of capacitor 410 to one of the outputs. For example, during aself-diagnostic test, the control signal causes demultiplexer 415 todirect the output of capacitor 410 to built-in self-test circuit 320. Asanother example, during an integration phase of integrator circuit 305,the control signal causes demultiplexer 415 to direct the output ofcapacitor 410 to integrator circuit 305 and/or current amplifier circuit300.

FIG. 5 illustrates an example signal diagram for pre-charging anintegrator circuit 305 using a compensation circuit 315 according to anembodiment of the present disclosure. As illustrated in FIG. 5, chargecan he added and/or removed from an input of integrator circuit 305during the initialization of integrator circuit 305.

After initialization of integrator circuit 305, a negative integrationphase and a positive integration occurs. During each phase, integratorcircuit 305 integrates an input signal provided by touch sensor array106 and/or current amplifier circuit 300 to produce a first sense signal500 and a second sense signal 505. Initialization prepares integratorcircuit 305 and touch sensor controller 108 to detect touches on or neartouch sensor array 106. This disclosure contemplates initializationoccurring before touch sensor controller 108 measures for a touch.

As illustrated in FIG. 5, charge is added and/or removed from the signalbefore integrator circuit 305 enters the negative integration phase andthe positive integration phase. For example, before the negativeintegration phase, compensation circuit 315 adds charge to the signal.After charge is added, integrator circuit 305 performs a negativeintegration on the signal to produce first sense signal 500. The signalstarts at half the supply voltage. Then, shortly before the negativeintegration phase, the signal increases in voltage due to the addedcharge. Then, the signal gradually decreases to a quarter of the supplyvoltage during the negative integration phase. Integrator circuit 305then holds first sense signal 500 at a quarter of the supply voltage. Asa result, the available headroom in first sense signal 500 increasesthereby allowing for a higher system gain that increases the size of atouch signal, making it easier to detect.

To produce second sense signal 505, integrator circuit 305 performs apositive integration during the positive integration phase. Before thepositive integration phase, compensation circuit 315 removes charge fromthe signal. As seen in FIG. 5, the signal starts at half supply voltage.Then, before the positive integration phase, the voltage of the signaldrops as charge is removed. Then, integrator circuit 305 performs thepositive integration on the signal and the signal gradually increases tothree quarters supply voltage. Integrator circuit 305 then holds secondsense signal 505 at three quarters supply voltage. As a result, theavailable headroom in second sense signal 505 increases thereby allowingfor a higher system gain that increases the size of a touch signal,making it easier to detect.

In one embodiment, the signal over control line 330 is used to addand/or remove an amount of charge that compensates offset errors in thecurrent amplifier circuit 300. Current amplifier circuit 300 may addand/or remove an amount of error charge during the integration phase dueto internal offset. Compensation circuit 315 and control line 330 cancancel this error charge so that the effect of offset in currentamplifier circuit 300 is not visible on an output of integrator circuit305.

FIG. 6 illustrates an example signal diagram for pre-charging anintegrator circuit 305 using a compensation circuit 315 according to anembodiment of the present disclosure. As illustrated in FIG. 6, insteadof adding and/or re-moving charge from the electric signal before thenegative integration phase and the positive integration phase,compensation circuit 315 can add and/or remove charge during thenegative integration phase and the positive integration phase.

As seen in FIG. 6, first sense signal 500 is produced by performing thenegative integration and by adding charge to the signal during thenegative integration phase. As shown in FIG. 6, the electric signalstarts at half supply voltage and then the negative integration isperformed during the negative integration phase. Furthermore, charge isadded to the electric signal during the negative integration phase. As aresult, first sense signal 500 still ends up at quarter supply voltage.As a result of charge compensation, the system gain may he increasedwithout first sense signal 500 hitting a rail (e.g., ground or supply)during the integration phase.

Similarly, second sense signal 505 is produced by performing a positiveintegration and by removing charge during the positive integrationphase. As a result, the electric signal starts at half supply voltageand then the positive integration is performed during the positiveintegration phase. Furthermore, charge is removed from the electricsignal during the positive integration phase. As a result, second sensesignal 505 ends up at three quarters supply voltage. As a result ofcharge compensation, the system gain may be increased without secondsense signal 505 hitting a rail (e.g., ground or supply) during theintegration phase.

This disclosure contemplates integrator circuit 305 and compensationcircuit 315 performing the pre-charging routines described using FIGS. 5and 6 each time before sense circuit 310 measures first sense signal 500and second sense signal 505 to determine whether a touch occurred. Forexample, after sense circuit 310 determines that no touch has occurred,integrator circuit 305 can reset first sense signal 500 and second sensesignal 505 back to half supply voltage. Then, compensation circuit 315adds and/or removes charge and the negative and positive integrationphases occur again. Then, sense circuit 310 can measure first sensesignal 500 and second sense signal 505 again to determine whether atouch occurred.

Although this disclosure describes integrator circuit 305 producingfirst sense signal 500 at quarter supply voltage and second sense signal505 at three quarters supply voltage. this disclosure contemplatesintegrator circuit 305 producing first sense signal 500 and second sensesignal 505 at any voltage. For example, integrator circuit 305 couldproduce first sense signal 500 at one third supply voltage and secondsense signal 505 at two thirds supply voltage. This disclosure alsocontemplates compensation circuit adding and/or removing any amount ofcharge from components of touch sensor controller 108.

FIG. 7 illustrates an example method 700 for detecting a touch accordingto an embodiment of the present disclosure. In one embodiment, touchsensor controller 108 performs method 700. By performing method 700,touch sensor controller increases the amount of headroom in which touchsensor controller 108 monitors a first and second sense signals, whichimproves the accuracy of touch sensor 102. For example, an actual touchmay change the voltage at which first sense signal 500 and/or secondsense signal 505 end up (e.g., quarter supply voltage or three-quarterssupply voltage). The increased headroom allows for a wider signal rangeavailable for detecting the touch signal.

Controller 108 resets an integrator circuit to half supply voltage instep 705. By resetting the integrator circuit to half supply voltage,two sense signals at half supply voltage arc produced. Then, in step 710controller 108 applies a positive charge to an input of the integratorcircuit. In step 715, controller 108 performs a negative integration ofan input signal to the integrator circuit and the positive charge toproduce a first sense signal. In one embodiment, the first sense signalis reduced from half supply voltage to quarter supply voltage as aresult of the negative integration.

In step 720, controller 108 applies a negative charge to the input ofthe integrator circuit. Then in step 725, controller 108 performs apositive integration of an input signal to the integrator circuit andthe negative charge to produce a second sense signal. In one embodiment,the second sense signal increases from half supply voltage to threequarters supply voltage as a result of the positive integration.Controller 108 concludes in step 730 by detecting a touch on a touchsensor using the first sense signal and the second sense signal. In oneembodiment, by performing method 700 controller 108 increases theheadroom available to detect a touch using the first sense signal andthe second sense signal.

In one embodiment, an apparatus includes an integrator circuit, acompensation circuit, and a sense circuit. The integrator circuitintegrates a signal to produce a first sense signal and a second sensesignal. The signal is based on a charge at an electrode of a touchsensor. The compensation circuit includes a driver, a resistor, and acapacitor. The resistor is coupled to an output of the driver. Thecapacitor is coupled to the resistor and to an input of the integratorcircuit. The sense circuit is coupled to art output of die integratorcircuit. The sense circuit detects a touch using the first sense signaland the second sense signal. In one embodiment, the compensation circuitfurther includes a demultiplexer coupled to the capacitor and thecapacitor is further coupled to an input of a current amplifier circuitthrough the demultiplexer. The current amplifier is coupled to the inputof the integrator circuit. In one embodiment, the compensation circuitfurther includes a demultiplexer coupled to the capacitor and thecapacitor is further coupled to a built-in self-test bus. In oneembodiment, the capacitor is a variable capacitor. In one embodiment,the resistor is a variable resistor. In one embodiment, the first sensesignal is produced during a negative integration phase of the integratorcircuit and the second sense signal is produced during a positiveintegration phase of the integrator circuit. In one embodiment, theapparatus includes a current amplifier circuit coupled to the input ofthe integrator. The compensation circuit is powered by a ground-basedreference voltage that is substantially constant over the operatingtemperature range of touch sensor 102 (e.g., −40 to 105 degrees Celcius)and substantially independent of a supply voltage used to power theintegrator circuit. The current amplifier circuit includes an input fora positive reference voltage and a negative reference voltage. Themagnitude of the positive reference voltage and the magnitude of thenegative reference voltage are substantially equal to the magnitude ofthe ground-based reference voltage. In one embodiment, the compensationcircuit adds charge to the amplified signal before a negativeintegration phase of the integrator circuit and the compensation circuitremoves charge from the amplified signal before a positive integrationphase of the integrator circuit. In one embodiment, the compensationcircuit adds charge to the amplified signal during a negativeintegration phase of the integrator circuit and the compensation circuitremoves charge from the amplified signal during a positive integrationphase of the integrator circuit.

In one embodiment, a non-transitory computer-readable medium includeslogic that when executed by a processor, causes the processor to apply,through a compensation circuit, a positive charge to an input of anintegrator circuit. The integrator circuit integrates a signalcommunicated by an electrode of a touch sensor and the positive chargeto produce a first sense signal. The signal is based on a charge at anelectrode of a touch sensor. The logic further causes the processor toapply, through the compensation circuit a negative charge to the inputof the integrator circuit. The integrator circuit integrates the signaland the negative charge to produce a second sense signal. The logic alsocauses the processor to detect a touch using the first sense signal andthe second sense signal. In one embodiment, the logic anther causes theprocessor to apply, through the compensation circuit, a positive chargeto an input of a current amplifier circuit coupled to the input of theintegrator circuit and to apply through the compensation circuit, anegative charge to the input of the current amplifier circuit. In oneembodiment, the logic further causes the processor to apply, through thecompensation circuit, a positive charge to a built-in self-test bus andto apply, through the compensation circuit, a negative charge to thebuilt-in self-test bus. In one embodiment, the first sense signal isproduced during a negative integration phase of the integrator circuitand the second sense signal is produced during a positive integrationphase of the integrator circuit. In one embodiment, the positive chargeis applied to the input of the integrator circuit before a negativeintegration phase of the integrator circuit and the negative charge isapplied to the input of the integrator circuit before a positiveintegration phase of the integrator circuit. In one embodiment, thepositive charge is applied to the input of the integrator circuit duringa negative integration phase of the integrator circuit and the negativecharge is applied to the input of the integrator circuit during apositive integration phase of the integrator circuit.

Embodiments of the present disclosure provide one or more technicaladvantages. For example, one embodiment improves the accuracy of touchsensor 102 by increasing the headroom available to monitor first andsecond sense signals, which also improves the signal-to-noise ratio ofelectric signals provided by a touch sensor array. As yet anotherexample, one embodiment allows for self-testing and runtime diagnostictesting of touch sensor controller 108 through a built-in self-test bus.Certain embodiments of the invention may include none, some, or all ofthe above technical advantages. One or more other technical advantagesmay he readily apparent to one skilled in the art from the figures,descriptions, and claims included herein.

Herein, a computer-readable non-transitory storage medium or media mayinclude one or more semiconductor-based or other integrated circuits(ICs) (such, as for example, field-programmable gate arrays (FPGAs) orapplication-specific ICs (ASICs)), hard disk drives (HDDs), hybrid harddrives (HHDs), optical discs, optical disc drives (ODDs),magneto-optical discs, magneto-optical drives, floppy diskettes, floppydisk drives (FDDs), magnetic tapes, solid-state drives (SSDs),RAM-drives, SECURE DIGITAL, cards or drives, any other computer-readablenon-transitory storage media, or any combination of two or more ofthese. A computer-readable non-transitory storage medium may bevolatile, non-volatile, or a combination of volatile and non-volatile.

Herein, “or” is inclusive and not exclusive, unless expressly indicatedotherwise or indicated otherwise by context. Therefore, herein, “A or B”means “A, B, or both,” unless expressly indicated otherwise or indicatedotherwise by context. Moreover, “and” is both joint and several, unlessexpressly indicated otherwise or indicated otherwise by context.Therefore, herein, “A and B” means “A and B, jointly or severally,”unless expressly indicated otherwise or indicated otherwise by context.Additionally, components referred to as being “coupled” includes thecomponents being directly coupled or indirectly coupled.

This disclosure encompasses a myriad of changes, substitutions,variations, alterations, and modifications to the example embodimentsherein that a person having ordinary skill in the art would comprehend.Similarly, where appropriate, the appended claims encompass all changes,substitutions, variations, alterations, and modifications to the exampleembodiments herein that a person having ordinary skill in the art wouldcomprehend. Moreover, reference in the appended claims to an apparatusor system or a component of an apparatus or system being adapted to,arranged to, capable of, configured to, enabled to, operable to, oroperative to perform a particular function encompasses that apparatus,system, component, whether or not it or that particular function isactivated, turned on, or unlocked, as long as that apparatus, system, orcomponent is so adapted, arranged, capable, configured, enabled,operable, or operative.

What is claimed is:
 1. An apparatus comprising: an integrator circuit; acompensation circuit operable to: apply, during a first time period, apositive charge to the integrator circuit, the integrator circuitoperable to integrate a signal and the positive charge to produce afirst sense signal, the signal based on a charge at an electrode of atouch sensor; and apply, during a second time period, a negative chargeto the integrator circuit, the integrator circuit further operable tointegrate the signal and the negative charge to produce a second sensesignal; and a sense circuit operable to detect a touch based on thefirst sense signal and the second sense signal.
 2. The apparatus ofclaim 1, wherein the compensation circuit comprises: a driver; aresistor coupled to the driver; a capacitor coupled to the resistor; anda demultiplexer coupled to the capacitor.
 3. The apparatus of claim 2,wherein the resistor is a variable resistor.
 4. The apparatus of claim2, wherein the capacitor is a variable capacitor.
 5. The apparatus ofclaim 2, wherein the driver uses a ground based reference voltage as asupply to remove an effect of drift in a main supply voltage.
 6. Theapparatus of claim 1, wherein the compensation circuit comprises ademultiplexer, an output of the demultiplexer is coupled to theintegrator circuit, an input of the demultiplexer is coupled to thecapacitor.
 7. The apparatus of claim 1, wherein the compensation circuitcomprises a demultiplexer, an output of the demultiplexer is coupled toa current amplifier circuit, an input of the demultiplexer is coupled tothe capacitor.
 8. The apparatus of claim 1, wherein the compensationcircuit comprises a demultiplexer, an output of the demultiplexer iscoupled to a built-in self-test bus, an input of the demultiplexer iscoupled to the capacitor.
 9. The apparatus of claim 1 further comprisinga current amplifier circuit coupled to the integrator circuit and thecompensation circuit.
 10. The apparatus of claim 1 further comprising abuilt-in self-test bus coupled to the compensation circuit.
 11. A devicecomprising: a touch sensor array; an integrator circuit; a compensationcircuit operable to: apply, during a first time period, a positivecharge to the integrator circuit, the integrator circuit operable tointegrate a signal and the positive charge to produce a first sensesignal, the signal based on a charge at an electrode of the touch sensorarray; and apply, during a second time period, a negative charge to theintegrator circuit, the integrator circuit further operable to integratethe signal and the negative charge to produce a second sense signal; anda sense circuit operable to detect a touch based on the first sensesignal and the second sense signal.
 12. The device of claim 11, whereinthe compensation circuit comprises: a driver; a resistor coupled to thedriver; a capacitor coupled to the resistor; and a demultiplexer coupledto the capacitor.
 13. The device of claim 12, wherein the resistor is avariable resistor.
 14. The device of claim 12, wherein the capacitor isa variable capacitor.
 15. The device of claim 12, wherein the driveruses a ground based reference voltage as a supply to remove an effect ofdrift in a main supply voltage.
 16. The device of claim 11, wherein thecompensation circuit comprises a demultiplexer, an output of thedemultiplexer is coupled to the integrator circuit, an input of thedemultiplexer is coupled to the capacitor.
 17. The device of claim 11,wherein the compensation circuit comprises a demultiplexer, an output ofthe demultiplexer is coupled to a current amplifier circuit, an input ofthe demultiplexer is coupled to the capacitor.
 18. The device of claim11, wherein the compensation circuit comprises a demultiplexer, anoutput of the demultiplexer is coupled to a built-in self-test bus, aninput of the demultiplexer is coupled to the capacitor.
 19. The deviceof claim 11, further comprising a current amplifier circuit coupled tothe integrator circuit and the compensation circuit.
 20. The device ofclaim 11, further comprising a built-in self-test bus coupled to thecompensation circuit.